<template>
  <div class="goods_wrap">
    <el-steps :active="active" align-center>
      <el-step title="基本信息"></el-step>
      <el-step title="商品相册"></el-step>
      <el-step title="商品详情"></el-step>
      <el-step title="上架信息"></el-step>
    </el-steps>

    <el-form class="goods_content">
      <el-form
        label-width="80px"
        :model="formLabelAlign"
      >
        <el-form-item label="商品规格">
          <el-radio-group v-model="pricelabel">
            <el-radio :label="1">单价格</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="库存">
          <el-table-column>
            <el-input-number
              :min="0"
              v-model="inventory"
              @change="getVal"
            ></el-input-number>
          </el-table-column>
        </el-form-item>
        <el-form-item label="市场价">
          <el-table-column>
            <el-input-number
              :min="0"
              v-model="marketPrice"
              @change="getVal"
            ></el-input-number>
          </el-table-column>
        </el-form-item>
        <el-form-item label="价格">
          <el-table-column>
            <el-input-number
              :min="0"
              v-model="price"
              @change="getVal"
            ></el-input-number>
          </el-table-column>
        </el-form-item>
      </el-form>
    </el-form>
    <el-button type="success" style="margin-top: 12px" @click="last"
      >上一步</el-button
    >
    <el-button type="success" style="margin-top: 12px" @click="next"
      >提交</el-button
    >
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      pricelabel: 1,
      inventory: 0,
      marketPrice: 0,
      price: 0,
      active: 3,
      formLabelAlign: {
        name: "",
        region: "",
        type: "",
      },
    };
  },
  components: {},
  methods: {
    next() {
      this.$router.push("/productList");
    },
    last() {
      this.$router.push("/proDetails");
    },
    getVal() {
      //正确方式
      this.puhuoPartsDetail.map((v) => {
        this.$set(v, "num", 0);
      });
    },
  },
};
</script>

<style scoped>
.goods_wrap {
  width: 100%;
  height: 100%;
  padding: 50px 10px;
  background-color: #fff;
  box-sizing: border-box;
}
.goods_content {
  width: 1200px;
  margin: 0 auto;
  padding: 50px 0px;
  display: flex;
  padding-right: 80px;
  justify-content: center;
  box-sizing: border-box;
}
.goods_content .el-form-item{
    text-align: left;
}
</style>